hip.util.reflection

Undocumented in source.

Members

Aliases

Parameters
alias Parameters = getParams
Undocumented in source.

Enums

hasModule
eponymoustemplate hasModule(string modulePath)
Undocumented in source.
hasType
eponymoustemplate hasType(string TypeName)
Undocumented in source.

Functions

ForwardFunc
string ForwardFunc()

Private to forward interface

GenerateGetterSettersInterfaceImpl
void GenerateGetterSettersInterfaceImpl()
Undocumented in source. Be warned that the author may not have intended to support it.
attributes
string attributes()
Undocumented in source. Be warned that the author may not have intended to support it.
enumLength
size_t enumLength()
Undocumented in source. Be warned that the author may not have intended to support it.
isMethodImplemented
bool isMethodImplemented()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeArrayOf
bool isTypeArrayOf()

Used when wanting to represent any struct compatible with a static array.

Mixin templates

ForwardInterface2
mixintemplate ForwardInterface2(string member, I)
Undocumented in source.
GenerateGettersSettersInterface
mixintemplate GenerateGettersSettersInterface(interface_)

Generates getter and setter for given interface. - Final methods are excluded. - void return types are excluded - const methods will only generate the const getter

GenerateRuntimeAccessors
mixintemplate GenerateRuntimeAccessors()

This mixin is able to generate runtime accessors. That means that by having a string, it is possible to modify

HipExportDFunctions
mixintemplate HipExportDFunctions(alias mod)

Iterates through a module and generates export function declaration for each @ExportD function found on it. If the class itself is @ExportD, it will create a method new(ClassName) to be exported too * The difference with HipExportDFunctions is that it does not generate * Static method output when not in script version.

HipExportDFunctionsImpl
mixintemplate HipExportDFunctionsImpl(string className, Class)

Intermediary step for getting an alias to the Class type The difference with HipExportDFunctionsImpl is that it does not generate Static method output when not in script version.

Structs

ExportD
struct ExportD

Used on: - Static Methods - Class Names Used in conjunction to HipExportDFunctions. You may specify a suffix, if you so, _suffix is added ExportD will do nothing to static methods when building release. However, it will still produce a function for returning a new class.

Version
struct Version
Undocumented in source.

Templates

generateExportConstructor
template generateExportConstructor(ClassT, string className)

ClassT, Ctor, string className This class MUST have an interface, because it will bug out when calling the function with need opCmp for class

generateExportFunc
template generateExportFunc(string className, alias funcSymbol)

It will create a export extern(System) function, thus, making it a C callable code. This function comes from a static method, and has special code injection for making the GC not collect if it is an object

generateExportName
template generateExportName(string className, alias funcSymbol)

Will basically generate an export name such as className_funcSymbol If it has ExportD with a suffix, it will be basically className_funcSymbol(suffix)

getParams
template getParams(alias fn)
Undocumented in source.
getUDAs
template getUDAs(alias symbol)
Undocumented in source.
hasMethod
template hasMethod(T, string method, Params...)
Undocumented in source.
hasOverload
template hasOverload(T, string member, OverloadType)
Undocumented in source.
hasUDA
template hasUDA(alias symbol, alias UDA)
Undocumented in source.
isDynamicArray
template isDynamicArray(T)
Undocumented in source.
isEnum
template isEnum(alias s)
Undocumented in source.
isFunction
template isFunction(X...)

Copy pasted from std.traits for not importing too many things

isNumeric
template isNumeric(T)

Detect whether T is a built-in numeric type (integral or floating point).

isReference
template isReference(T)
Undocumented in source.

Variables

isArray
enum bool isArray(T);
Undocumented in source.
isPointer
enum bool isPointer(T);

Detect whether type T is a pointer.

Meta